/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SuccessfulArchives.java
 *
 * Created on Aug 3, 2011, 8:16:18 PM
 */
package invento;

import javax.swing.JFrame;

/**
 *
 * @author Kristina
 */
public class SuccessfulArchives extends javax.swing.JFrame {
    JFrame parent;
    /** Creates new form SuccessfulArchives */
    public SuccessfulArchives(JFrame parent) {
        initComponents();
        this.parent = parent;
    }

    SuccessfulArchives(ConfirmArchives aThis) {
       
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        buttonOkArch = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Successfully sent to Archives!");

        buttonOkArch.setText("OK");
        buttonOkArch.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                buttonOkArchMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(71, 71, 71)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(buttonOkArch)
                    .addComponent(jLabel1))
                .addContainerGap(26, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(46, 46, 46)
                .addComponent(jLabel1)
                .addGap(28, 28, 28)
                .addComponent(buttonOkArch)
                .addContainerGap(27, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonOkArchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonOkArchMouseClicked
        // TODO add your handling code here:
        returntomain();
    }//GEN-LAST:event_buttonOkArchMouseClicked

    /**
     * @param args the command line arguments
     */
    public void returntomain(){
    
        this.setVisible(false);
        this.dispose();
        parent.setEnabled(true);
        parent.requestFocus();
        
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonOkArch;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
